﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleTest
{
    class Pointer
    {
      unsafe  public static void FixedArrayTest()
        {
            Foo foo = new Foo();
            foo.mm = -1;
           // System.Console.WriteLine(foo.test);
            System.Console.WriteLine(foo.mm);
            foo.arr[10] = 9999;
           // System.Console.WriteLine(foo.test);
            System.Console.WriteLine(foo.mm);

            

          int[] ss=new int[10];
          ss[9] = 22;
          System.Console.WriteLine(ss[9]);


          System.Console.ReadLine();
        }

      public static unsafe void ToUpper(string str)
      {
          fixed (char* pfixed = str)
          {
              for (char* p = pfixed; *p != 0; p++)
              {
                  *p = char.ToUpper(*p);
              }
          }
      }
    }

    unsafe struct Foo
    {
        public int mm;
        public fixed int arr[10];
        
        //public int test;
    }


    //
    
}
